package com.sunny.fetch.pojo;

import javax.persistence.*;

@Table(name = "f_fut_daily")
public class FFutDaily {
    @Id
    private Long tid;

    /**
     * TS合约代码
     */
    @Column(name = "ts_code")
    private String tsCode;

    /**
     * 交易日期
     */
    @Column(name = "trade_date")
    private String tradeDate;

    /**
     * 昨收盘价
     */
    @Column(name = "pre_close")
    private Float preClose;

    /**
     * 昨结算价
     */
    @Column(name = "pre_settle")
    private Float preSettle;

    /**
     * 开盘价
     */
    private Float open;

    /**
     * 最高价
     */
    private Float high;

    /**
     * 最低价
     */
    private Float low;

    /**
     * 收盘价
     */
    private Float close;

    /**
     * 结算价
     */
    private Float settle;

    /**
     * 涨跌1 收盘价-昨结算价
     */
    private Float change1;

    /**
     * 涨跌2 结算价-昨结算价
     */
    private Float change2;

    /**
     * 成交量(手)
     */
    private Float vol;

    /**
     * 成交金额(万元)
     */
    private Float amount;

    /**
     * 持仓量(手)
     */
    private Float oi;

    /**
     * 持仓量变化
     */
    @Column(name = "oi_chg")
    private Float oiChg;

    /**
     * 交割结算价
     */
    @Column(name = "delv_settle")
    private Float delvSettle;

    public FFutDaily(Long tid, String tsCode, String tradeDate, Float preClose, Float preSettle, Float open, Float high, Float low, Float close, Float settle, Float change1, Float change2, Float vol, Float amount, Float oi, Float oiChg, Float delvSettle) {
        this.tid = tid;
        this.tsCode = tsCode;
        this.tradeDate = tradeDate;
        this.preClose = preClose;
        this.preSettle = preSettle;
        this.open = open;
        this.high = high;
        this.low = low;
        this.close = close;
        this.settle = settle;
        this.change1 = change1;
        this.change2 = change2;
        this.vol = vol;
        this.amount = amount;
        this.oi = oi;
        this.oiChg = oiChg;
        this.delvSettle = delvSettle;
    }

    public FFutDaily() {
        super();
    }

    /**
     * @return tid
     */
    public Long getTid() {
        return tid;
    }

    /**
     * @param tid
     */
    public void setTid(Long tid) {
        this.tid = tid;
    }

    /**
     * 获取TS合约代码
     *
     * @return ts_code - TS合约代码
     */
    public String getTsCode() {
        return tsCode;
    }

    /**
     * 设置TS合约代码
     *
     * @param tsCode TS合约代码
     */
    public void setTsCode(String tsCode) {
        this.tsCode = tsCode;
    }

    /**
     * 获取交易日期
     *
     * @return trade_date - 交易日期
     */
    public String getTradeDate() {
        return tradeDate;
    }

    /**
     * 设置交易日期
     *
     * @param tradeDate 交易日期
     */
    public void setTradeDate(String tradeDate) {
        this.tradeDate = tradeDate;
    }

    /**
     * 获取昨收盘价
     *
     * @return pre_close - 昨收盘价
     */
    public Float getPreClose() {
        return preClose;
    }

    /**
     * 设置昨收盘价
     *
     * @param preClose 昨收盘价
     */
    public void setPreClose(Float preClose) {
        this.preClose = preClose;
    }

    /**
     * 获取昨结算价
     *
     * @return pre_settle - 昨结算价
     */
    public Float getPreSettle() {
        return preSettle;
    }

    /**
     * 设置昨结算价
     *
     * @param preSettle 昨结算价
     */
    public void setPreSettle(Float preSettle) {
        this.preSettle = preSettle;
    }

    /**
     * 获取开盘价
     *
     * @return open - 开盘价
     */
    public Float getOpen() {
        return open;
    }

    /**
     * 设置开盘价
     *
     * @param open 开盘价
     */
    public void setOpen(Float open) {
        this.open = open;
    }

    /**
     * 获取最高价
     *
     * @return high - 最高价
     */
    public Float getHigh() {
        return high;
    }

    /**
     * 设置最高价
     *
     * @param high 最高价
     */
    public void setHigh(Float high) {
        this.high = high;
    }

    /**
     * 获取最低价
     *
     * @return low - 最低价
     */
    public Float getLow() {
        return low;
    }

    /**
     * 设置最低价
     *
     * @param low 最低价
     */
    public void setLow(Float low) {
        this.low = low;
    }

    /**
     * 获取收盘价
     *
     * @return close - 收盘价
     */
    public Float getClose() {
        return close;
    }

    /**
     * 设置收盘价
     *
     * @param close 收盘价
     */
    public void setClose(Float close) {
        this.close = close;
    }

    /**
     * 获取结算价
     *
     * @return settle - 结算价
     */
    public Float getSettle() {
        return settle;
    }

    /**
     * 设置结算价
     *
     * @param settle 结算价
     */
    public void setSettle(Float settle) {
        this.settle = settle;
    }

    /**
     * 获取涨跌1 收盘价-昨结算价
     *
     * @return change1 - 涨跌1 收盘价-昨结算价
     */
    public Float getChange1() {
        return change1;
    }

    /**
     * 设置涨跌1 收盘价-昨结算价
     *
     * @param change1 涨跌1 收盘价-昨结算价
     */
    public void setChange1(Float change1) {
        this.change1 = change1;
    }

    /**
     * 获取涨跌2 结算价-昨结算价
     *
     * @return change2 - 涨跌2 结算价-昨结算价
     */
    public Float getChange2() {
        return change2;
    }

    /**
     * 设置涨跌2 结算价-昨结算价
     *
     * @param change2 涨跌2 结算价-昨结算价
     */
    public void setChange2(Float change2) {
        this.change2 = change2;
    }

    /**
     * 获取成交量(手)
     *
     * @return vol - 成交量(手)
     */
    public Float getVol() {
        return vol;
    }

    /**
     * 设置成交量(手)
     *
     * @param vol 成交量(手)
     */
    public void setVol(Float vol) {
        this.vol = vol;
    }

    /**
     * 获取成交金额(万元)
     *
     * @return amount - 成交金额(万元)
     */
    public Float getAmount() {
        return amount;
    }

    /**
     * 设置成交金额(万元)
     *
     * @param amount 成交金额(万元)
     */
    public void setAmount(Float amount) {
        this.amount = amount;
    }

    /**
     * 获取持仓量(手)
     *
     * @return oi - 持仓量(手)
     */
    public Float getOi() {
        return oi;
    }

    /**
     * 设置持仓量(手)
     *
     * @param oi 持仓量(手)
     */
    public void setOi(Float oi) {
        this.oi = oi;
    }

    /**
     * 获取持仓量变化
     *
     * @return oi_chg - 持仓量变化
     */
    public Float getOiChg() {
        return oiChg;
    }

    /**
     * 设置持仓量变化
     *
     * @param oiChg 持仓量变化
     */
    public void setOiChg(Float oiChg) {
        this.oiChg = oiChg;
    }

    /**
     * 获取交割结算价
     *
     * @return delv_settle - 交割结算价
     */
    public Float getDelvSettle() {
        return delvSettle;
    }

    /**
     * 设置交割结算价
     *
     * @param delvSettle 交割结算价
     */
    public void setDelvSettle(Float delvSettle) {
        this.delvSettle = delvSettle;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", tid=").append(tid);
        sb.append(", tsCode=").append(tsCode);
        sb.append(", tradeDate=").append(tradeDate);
        sb.append(", preClose=").append(preClose);
        sb.append(", preSettle=").append(preSettle);
        sb.append(", open=").append(open);
        sb.append(", high=").append(high);
        sb.append(", low=").append(low);
        sb.append(", close=").append(close);
        sb.append(", settle=").append(settle);
        sb.append(", change1=").append(change1);
        sb.append(", change2=").append(change2);
        sb.append(", vol=").append(vol);
        sb.append(", amount=").append(amount);
        sb.append(", oi=").append(oi);
        sb.append(", oiChg=").append(oiChg);
        sb.append(", delvSettle=").append(delvSettle);
        sb.append("]");
        return sb.toString();
    }
}